package ytdp.careagle.com.ytdp.entity;

import com.google.gson.Gson;

import java.io.Serializable;

/**
 * Created by admin on 2017/10/10.
 */

public class SellCarProgramEntity implements Serializable {


    /**
     * id : 3
     * displayName : null
     * modelName : 2016款 高尔夫 1.6L 自动舒适型
     * modelCode : 8268-n
     * multimedia : {"id":3,"sourceType":"SOURCE_IMAGE","sourceUrl":"http://owgu4sick.bkt.clouddn.com/o_1bs265do9ra915laib4vri31t7.png-image720center","sourceVideoUrl":null}
     * online : true
     * sellPrice : null
     * seriesCode : null
     * seriesName : null
     */

    private int id;
    private String displayName;
    private String modelName;
    private String modelCode;
    private MultimediaBean multimedia;
    private boolean online;
    private Double sellPrice;
    private Object seriesCode;
    private String seriesName;

    public static SellCarProgramEntity objectFromData(String str) {

        return new Gson().fromJson(str, SellCarProgramEntity.class);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public String getModelCode() {
        return modelCode;
    }

    public void setModelCode(String modelCode) {
        this.modelCode = modelCode;
    }

    public MultimediaBean getMultimedia() {
        return multimedia;
    }

    public void setMultimedia(MultimediaBean multimedia) {
        this.multimedia = multimedia;
    }

    public boolean isOnline() {
        return online;
    }

    public void setOnline(boolean online) {
        this.online = online;
    }

    public Double getSellPrice() {
        if (sellPrice == null) {
            sellPrice = 0d;
        }
        return sellPrice;
    }

    public void setSellPrice(Double sellPrice) {
        this.sellPrice = sellPrice;
    }

    public Object getSeriesCode() {
        return seriesCode;
    }

    public void setSeriesCode(Object seriesCode) {
        this.seriesCode = seriesCode;
    }

    public String getSeriesName() {
        return seriesName;
    }

    public void setSeriesName(String seriesName) {
        this.seriesName = seriesName;
    }

    public static class MultimediaBean implements Serializable {
        /**
         * id : 3
         * sourceType : SOURCE_IMAGE
         * sourceUrl : http://owgu4sick.bkt.clouddn.com/o_1bs265do9ra915laib4vri31t7.png-image720center
         * sourceVideoUrl : null
         */

        private int id;
        private String sourceType;
        private String sourceUrl;
        private String sourceVideoUrl;

        public static MultimediaBean objectFromData(String str) {

            return new Gson().fromJson(str, MultimediaBean.class);
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getSourceType() {
            return sourceType;
        }

        public void setSourceType(String sourceType) {
            this.sourceType = sourceType;
        }

        public String getSourceUrl() {
            return sourceUrl;
        }

        public void setSourceUrl(String sourceUrl) {
            this.sourceUrl = sourceUrl;
        }

        public String getSourceVideoUrl() {
            return sourceVideoUrl;
        }

        public void setSourceVideoUrl(String sourceVideoUrl) {
            this.sourceVideoUrl = sourceVideoUrl;
        }
    }
}
